Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jbox2d.collision
Class PolygonShape

    java.lang.Object
      org.jbox2d.collision.Shape
          org.jbox2d.collision.PolygonShape

All Implemented Interfaces:
  SupportsGenericDistance

    public class PolygonShape

extends Shape
implements SupportsGenericDistance

Field Summary
`Vec2` | `m_centroid`
`Vec2[]` | `m_coreVertices`
`Vec2[]` | `m_normals`
`OBB` | `m_obb`
`int` | `m_vertexCount`
`Vec2[]` | `m_vertices`

Fields inherited from class org.jbox2d.collision.Shape
`m_body, m_categoryBits, m_density, m_friction, m_groupIndex, m_isSensor, m_maskBits, m_next, m_proxyId, m_restitution, m_sweepRadius, m_type, m_userData, uid`

Constructor Summary
`PolygonShape(ShapeDef def)`

Method Summary
`Vec2` | `centroid(XForm xf)`
`void` | `computeAABB(AABB aabb, XForm xf)`
`static Vec2` | `computeCentroid(java.util.List<Vec2> vs)`
`void` | `computeMass(MassData massData)`
`static void` | `computeOBB(OBB obb, Vec2[] vs)`
`void` | `computeSweptAABB(AABB aabb, XForm transform1, XForm transform2)`
`Vec2` | `getCentroid()`
`Vec2[]` | `getCoreVertices()`
`Vec2` | `getFirstVertex(XForm xf)`
`OBB` | `getOBB()`
`int` | `getVertexCount()`
`Vec2[]` | `getVertices()`
`Vec2` | `support(XForm xf, Vec2 d)`
`boolean` | `testPoint(XForm xf, Vec2 p)`
`void` | `updateSweepRadius(Vec2 center)`

Methods inherited from class org.jbox2d.collision.Shape
`create, createProxy, destroy, destroyProxy, destructor, getBody, getNext, getSweepRadius, getType, getUserData, isSensor, resetProxy, synchronize`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### m_centroid

    public Vec2 m_centroid

### m_obb

    public OBB m_obb

### m_vertices

    public Vec2[] m_vertices

### m_normals

    public Vec2[] m_normals

### m_coreVertices

    public Vec2[] m_coreVertices

### m_vertexCount

    public int m_vertexCount

Constructor Detail

### PolygonShape

    public PolygonShape(ShapeDef def)

Method Detail

### updateSweepRadius

    public void updateSweepRadius(Vec2 center)

  Specified by:
    `updateSweepRadius` in class `Shape`

### testPoint

    public boolean testPoint(XForm xf,
                             Vec2 p)

  Specified by:
    `testPoint` in class `Shape`

### centroid

    public Vec2 centroid(XForm xf)

### support

    public Vec2 support(XForm xf,
                        Vec2 d)

  Specified by:
    `support` in interface `SupportsGenericDistance`

### computeCentroid

    public static Vec2 computeCentroid(java.util.List<Vec2> vs)

### computeOBB

    public static void computeOBB(OBB obb,
                                  Vec2[] vs)

### computeAABB

    public void computeAABB(AABB aabb,
                            XForm xf)

  Specified by:
    `computeAABB` in class `Shape`

### computeSweptAABB

    public void computeSweptAABB(AABB aabb,
                                 XForm transform1,
                                 XForm transform2)

  Specified by:
    `computeSweptAABB` in class `Shape`

### computeMass

    public void computeMass(MassData massData)

  Specified by:
    `computeMass` in class `Shape`

### getFirstVertex

    public Vec2 getFirstVertex(XForm xf)

  Specified by:
    `getFirstVertex` in interface `SupportsGenericDistance`

### getOBB

    public OBB getOBB()

### getCentroid

    public Vec2 getCentroid()

### getVertexCount

    public int getVertexCount()

### getVertices

    public Vec2[] getVertices()

### getCoreVertices

    public Vec2[] getCoreVertices()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD